<template>
  <div class="header-logo" @click="handleClickLogo">
    <img :src="logo" alt="logo" />
    <span>TAFlower</span>
  </div>
</template>
<script lang="ts" setup>
import logo from '@/assets/images/icon/icon-logo.png';
import { useRouter } from 'vue-router';
defineOptions({
  name: 'HeaderLogo',
});
const router = useRouter();
// 点击logo跳转首页
const handleClickLogo = () => {
  router.push('/home');
};
</script>
<style lang="scss" scoped>
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  img {
    width: 42px;
    height: 42px;
  }
  span {
    font-size: 24px;
  }
}
</style>
